// 请求通用方法
import apiMixin from '@/mixin/apiMixin';
import utils from '@/utils/index';
import env from '@/config/env';
export default {
    mixins: [apiMixin],
    data() {
        return {
            hotWord: '',
            hotWordArr: [],
            taskSta: false
        }
    },
    watch: {
      hotWord: function(val) {
        this.hotWordArr = val.split(',')
      }
    },
    mounted() {
        this.getMarkeyHotWord();
        this.getMarkeyTaskshow()
    },
    methods: {
        getMarkeyHotWord() {
            this.comResquest(this.request.getMarkeyHotWord,(res)=>{
              this.hotWord = res.join()
            },{
                load: true
            });
        },
        setMarkeyHotWord() {
            let hotWord = this.hotWord.split(',')
            this.comResquest(this.request.setMarkeyHotWord,(res)=>{

            },{
                hot_search: hotWord
            });
        },
        getMarkeyTaskshow() {
            this.comResquest(this.request.getMarkeyTaskshow,(res)=>{
              this.taskSta = res.status ? false : true
            },{
                load: true
            });
        },
        setMarkeyTaskshow() {
            this.comResquest(this.request.setMarkeyTaskshow,(res)=>{

            },{
                status: this.taskSta ? 0 : 1
            });
        },
    },
}
